﻿<div class="span10">
	<h1>Cadastrar Reserva</h1>
	<?php echo Flash::render(); ?>
	<?php echo Form::open('reserva/cadastrar', array('id' => 'reserva_cadastrar', 'class' => 'well')); ?>
	<script>
		$(document).ready(function(){
			$('.data').mask('99/99/9999');
			$('.hora').mask('00:00');
		});
	</script>
	<table>
	<tr>
		<td><label>Responsavel: </label></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			<select name="responsavel" class="required">
				<option disabled="disabled">Selecione um Responsável</option>
				<?php foreach($responsaveis as $responsavel): ?>
				<option value="<?php echo $responsavel->id; ?>"><?php echo $responsavel->nome; ?></option>
				<?php endforeach; ?>
			</select>&nbsp;
			<?php echo Html::anchor('responsavel/cadastrar', 'Cadastrar Novo Responsavel', array('class' => 'btn')); ?>
		</td>
	</tr>
	<tr>
		<td><label>Períodos: </label></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			De:<input type="text" name="datainicio[]" class="span2 data" placeholder="dd/mm/yyyy"> à <input type="text" name="datafim[]" class="span2 data" placeholder="dd/mm/yyyy"> Horário: <input type="text" name="horainicio[]" class="span1 hora" placeholder="hh:mm"> às <input type="text" name="horafim[]" class="span1 hora" placeholder="hh:mm">h<br>
			De:<input type="text" name="datainicio[]" class="span2 data" placeholder="dd/mm/yyyy"> à <input type="text" name="datafim[]" class="span2 data" placeholder="dd/mm/yyyy"> Horário: <input type="text" name="horainicio[]" class="span1 hora" placeholder="hh:mm"> às <input type="text" name="horafim[]" class="span1 hora" placeholder="hh:mm">h<br>
			De:<input type="text" name="datainicio[]" class="span2 data" placeholder="dd/mm/yyyy"> à <input type="text" name="datafim[]" class="span2 data" placeholder="dd/mm/yyyy"> Horário: <input type="text" name="horainicio[]" class="span1 hora" placeholder="hh:mm"> às <input type="text" name="horafim[]" class="span1 hora" placeholder="hh:mm">h<br>
			De:<input type="text" name="datainicio[]" class="span2 data" placeholder="dd/mm/yyyy"> à <input type="text" name="datafim[]" class="span2 data" placeholder="dd/mm/yyyy"> Horário: <input type="text" name="horainicio[]" class="span1 hora" placeholder="hh:mm"> às <input type="text" name="horafim[]" class="span1 hora" placeholder="hh:mm">h<br>
		</td>
	</tr>
	<tr>
		<td><label>Atividade: </label></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			<textarea name="atividade" class="span4" placeholder="Descrição da Atividade"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2"><button type="submit" name="cadastrar" class="btn btn-primary">Cadastrar</button></td>
	</tr>
	</table>
	<?php echo Form::close(); ?>
	
	
	<?php $view = new View('reserva/lista'); $view->bind('periodos', $periodos); echo $view; ?>
	
</div>